org.eclipse.vtp.framework.engine.runtime
Class Observer

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.runtime.Component
      extended by org.eclipse.vtp.framework.engine.runtime.Configurable
          extended by org.eclipse.vtp.framework.engine.runtime.Executable
              extended by org.eclipse.vtp.framework.engine.runtime.Observer

public class Observer
extends Executable

Represents an observer that can be run by the engine before or after an action.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from class org.eclipse.vtp.framework.engine.runtime.Component
blueprint, constructors, mutators
 
Constructor Summary
Observer(Blueprint blueprint, org.w3c.dom.Element[] elements, java.lang.String instanceID, ObserverDescriptor descriptor, Action observed)
          Creates a new Observer.
 
Method Summary
protected  void configure(Executable next)
          Configures this observer's placement in the process flow.
 Executable execute(Sequence sequence)
          Creates and executes an instance of this executable.
 Action getActionInstance()
          Returns the ID of the action instance that owns this executable.
 int getActionState()
          Returns the action state this executable runs in.
protected  java.lang.Class getComponentType()
           
 boolean isBlocking()
          Returns true if this execution is blocking.
 
Methods inherited from class org.eclipse.vtp.framework.engine.runtime.Executable
createInstance, createServiceRegistry, getInstanceID
 
Methods inherited from class org.eclipse.vtp.framework.engine.runtime.Configurable
createBuilder, lookupAllConfigurations, lookupConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Observer

public Observer(Blueprint blueprint,
                org.w3c.dom.Element[] elements,
                java.lang.String instanceID,
                ObserverDescriptor descriptor,
                Action observed)
         throws java.lang.NullPointerException
Creates a new Observer.

Parameters:
blueprint - The blueprint of the process.
elements - The configuration data or null for no configuration data.
instanceID - The ID of this instance of the observer.
descriptor - The descriptor of the observer.
observed - The action this observer is bound to.
Throws:
java.lang.NullPointerException - If the supplied blueprint is null.
java.lang.NullPointerException - If the supplied instance ID is null.
java.lang.NullPointerException - If the supplied descriptor is null.
java.lang.NullPointerException - If the supplied action is null.
Method Detail

configure

protected void configure(Executable next)
Configures this observer's placement in the process flow.

Parameters:
next - The next executable in the process or null.

getActionInstance

public Action getActionInstance()
Description copied from class: Executable
Returns the ID of the action instance that owns this executable.

Specified by:
getActionInstance in class Executable
Returns:
The ID of the action instance that owns this executable.

getActionState

public int getActionState()
Description copied from class: Executable
Returns the action state this executable runs in.

Specified by:
getActionState in class Executable
Returns:
The action state this executable runs in.

isBlocking

public boolean isBlocking()
Description copied from class: Executable
Returns true if this execution is blocking.

Specified by:
isBlocking in class Executable
Returns:
True if this execution is blocking.

execute

public Executable execute(Sequence sequence)
Description copied from class: Executable
Creates and executes an instance of this executable.

Specified by:
execute in class Executable
Parameters:
sequence - The sequence to create under.
Returns:
The next executable in the process or null if the process is over.

getComponentType

protected java.lang.Class getComponentType()